﻿<Application 
	x:Class="TradeMo.App"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
	xmlns:trademo="clr-namespace:TradeMo">

	<!--Application Resources-->
	<Application.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="GlobalResources.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			
			<trademo:VisibilityConverter x:Key="VisibilityConverter"/>
			<trademo:UniquePossitiveConverter x:Key="UniquePositiveConverter"/>

			<Style TargetType="phone:PhoneApplicationFrame" x:Key="CustomFrame">
				<Setter Property="IsTabStop" Value="False"/>
				<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
				<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeNormal}"/>
				<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
				<Setter Property="HorizontalAlignment" Value="Stretch"/>
				<Setter Property="VerticalAlignment" Value="Stretch"/>
				<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
				<Setter Property="VerticalContentAlignment" Value="Stretch"/>
				<Setter Property="Background" Value="Transparent"/>
				<Setter Property="BorderThickness" Value="0"/>
				<Setter Property="BorderBrush" Value="{x:Null}"/>
				<Setter Property="Padding" Value="0"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="phone:PhoneApplicationFrame">
							<Border x:Name="ClientArea" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" >
								<Grid>
									<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
									<!--<ProgressBar Foreground="White" 
                                             IsIndeterminate="False" 
                                             Style="{StaticResource PerformanceProgressBar}"
                                             Margin="0,2,0,0"
                                             x:Name="LoadingProgressBar"
                                             Visibility="Collapsed" 
                                             VerticalAlignment="Top" />-->
									<ContentPresenter x:Name="FauxPopup" Visibility="Collapsed" />
								</Grid>
							</Border>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>


		</ResourceDictionary>

	</Application.Resources>

	<Application.ApplicationLifetimeObjects>
		<!--Required object that handles lifetime events for the application-->
		<shell:PhoneApplicationService 
			Launching="Application_Launching" Closing="Application_Closing" 
			Activated="Application_Activated" Deactivated="Application_Deactivated"/>
	</Application.ApplicationLifetimeObjects>

</Application>